Skip to content

test: add E2E tests for editor auto-save persistence (#221)#228

Merged
zacharias-ona merged 2 commits into
mainfrom
feat/221-e2e-auto-save-persistence
Apr 18, 2026
Merged

test: add E2E tests for editor auto-save persistence (#221)#228
zacharias-ona merged 2 commits into
mainfrom
feat/221-e2e-auto-save-persistence

Conversation

@zacharias-ona
Copy link
Copy Markdown
Collaborator

Closes #221

What

Adds two E2E tests verifying the editor auto-save behavior:

  1. Persistence test — types content, waits for the debounced Supabase PATCH to complete, reloads the page, and asserts the content survived.
  2. Save indicator test — types content and asserts the "Saving..." → "Saved" status indicator appears in sequence.

How

  • Uses authenticatedPage fixture and navigateToEditorPage helper (each test gets a fresh page).
  • Waits for the Supabase PATCH response (/rest/v1/pages, method PATCH, 2xx status) before reloading — same pattern used in e2e/search.spec.ts.
  • Uses a Date.now() suffix in the typed text to avoid collisions between parallel runs.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test — 252 tests pass ✅
  • pnpm test:e2e -- e2e/editor-auto-save.spec.ts — 2 tests pass ✅

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment Apr 18, 2026 7:34am

Request Review

Comment thread e2e/editor-auto-save.spec.ts Outdated
…ition

The waitForContentSave promise was created after typing finished. If the
500ms debounce fired before Playwright registered the listener, the PATCH
response would be missed causing a flaky 10s timeout. Matches the pattern
used in e2e/search.spec.ts.

Co-authored-by: Ona <no-reply@ona.com>
@zacharias-ona zacharias-ona merged commit e030f9e into main Apr 18, 2026
6 checks passed
@zacharias-ona zacharias-ona deleted the feat/221-e2e-auto-save-persistence branch April 18, 2026 07:37
@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

✅ UI verification skipped — this PR only adds E2E test files (e2e/editor-auto-save.spec.ts). No UI components or pages were changed.

@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

✅ Post-merge verification skipped — test: PR with no production code changes (only e2e/editor-auto-save.spec.ts added).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add E2E tests for editor auto-save persistence

1 participant